#ifndef __CLOUDSERVER_H__
#define __CLOUDSERVER_H__
#include "workflow/WFFacilities.h"
#include "wfrest/HttpServer.h"
#include "LoadConfig.h"
#include <string>



class CloudiskServer{
public:
    //用户调用
    int start(unsigned short);
    void stop();
    void list_routes();
    CloudiskServer& track();
    void register_modules();
private:
    //register_modules调用以下方法注册路由进行服务器初始化
    void register_static_resources_modules();
    void register_signup_modules();
    void register_signin_modules();
    void register_userinfo_modules();
    void register_file_list_modules();
    void register_file_upload_modules();
    void register_file_download_modules();

private:
    //装饰器模式，给wfrest套壳
    wfrest::HttpServer m_server;    
    static std::string mysql_url; 
    static WFFacilities::WaitGroup m_wait_group;
    friend void sighandler(int);
};

#endif